/**
 * Moving queries are a role that is created 
 * when a moving object enters the system.
 * It has two lists: fully contained cells and partially contained cells.
 * 
 */
package entity;

import java.awt.geom.*;
import java.util.ArrayList;

/**
 * @author Xiaohui
 * 
 */
public class MovingQuery extends Ellipse2D.Double {
	ArrayList<Cell> fullCells;
	ArrayList<Cell> partialCells;
	int radius;
	Point2D focalLocation;

	public MovingQuery(double x, double y, int radius) {
		super(x, y, radius, radius);
		fullCells = new ArrayList<Cell>();
		this.partialCells = new ArrayList<Cell>();
		this.radius = radius;
		this.focalLocation = new Point2D.Double(x, y);
	}

	public void addFullCells(Cell c) {
		fullCells.add(c);
	}

	public void removeFullCell(Cell cell) {
		fullCells.remove(cell);
	}

	public void addPartCells(Cell c) {
		partialCells.add(c);
	}

	public void removePartCell(Cell cell) {
		partialCells.remove(cell);
	}

	public int getRadius() {
		return this.radius;
	}

	public Point2D getFocalLocation() {
		return this.focalLocation;
	}

}
